/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package cn.icanci.message.service;

import java.io.File;
import java.util.Map;

/**
 * @author icanci
 * @date Created in 2021/04/28 11:02
 * @version 1.0
 */
public interface JavaMailByQqService {

    /**
     * 测试邮件方法
     * 通过信息和目标邮箱发送邮件
     *
     * @param text 内容
     * @param to   发给谁
     */
    void sendMail(String text, String to);

    /**
     * 简单邮件发送
     *
     * @param subject 主题
     * @param text    内容
     * @param to      发给谁
     * @param from    谁发送
     */
    void sendMail(String subject, String text, String to, String from);

    /**
     * 通过信息和目标邮箱发送邮件 不带有附件
     *
     * @param subject 标题
     * @param text    发送的消息
     * @param from    从哪儿发
     * @param to      发送给谁
     * @throws javax.mail.MessagingException MessagingException
     */
    void sendMoreMail(String subject, String text, String from, String to) throws javax.mail.MessagingException;

    /**
     * 通过信息和目标邮箱发送邮件 带有附件的
     *
     * @param subject 标题
     * @param text    发送的消息
     * @param from    从哪儿发
     * @param to      发送给谁
     * @param map     附件对象
     * @throws javax.mail.MessagingException MessagingException
     */
    void sendMoreMail(String subject, String text, String from, String to, Map<String, File> map) throws javax.mail.MessagingException;

}